<script type="text/javascript" src="${webapp_url}js/editors/tinymce/tiny_mce.js"></script>

<#macro initEditor editorWidth=450 >
	<script type="text/javascript">
	tinyMCE.init({
		// General options
		mode : "textareas",
		theme : "advanced",
		skin : "bootstrap",
		editor_selector : "richtext",
		document_base_url : "${webapp_url}",
		convert_urls : false,
		language : "${locale}",
		accessibility_warnings : true,
		width : "${editorWidth}",
		plugins : "lutece,autolink,lists,pagebreak,style,save,advhr,advimage,advlink,iespell,inlinepopups,preview,media,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,wordcount,advlist,dailymotion",
		// Theme options
		theme_advanced_buttons1 : "bold,italic,|,justifyleft,justifycenter,justifyright,formatselect,styleselect,|,cut,copy,pastetext,|,bullist,numlist,blockquote",
		theme_advanced_buttons2 : "undo,redo,|,unlink,link,lutece,anchor,image,dailymotion,hr,removeformat,|,sub,sup,|,abbr,acronym,del,ins,attribs,charmap,|,code,|,fullscreen,|,help",
		// Theme options
		/*theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect",
		theme_advanced_buttons2 : "cut,copy,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,lutece,link,unlink,anchor,image,help,codemirror,|,insertdate,inserttime,|,forecolor,backcolor",
		theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
		theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,visualchars,nonbreaking,template,pagebreak,restoredraft",*/
		theme_advanced_toolbar_location : "top",
		theme_advanced_toolbar_align : "left",
		theme_advanced_statusbar_location : "bottom",
		theme_advanced_resizing : true,
		paste_auto_cleanup_on_paste : true,
		theme_advanced_styles : "Paragraphe gras=lead;Encadre couleur=well",
		// Extended elements
		extended_valid_elements : "iframe[style|src|width|height|name|align|frameborder|scrolling],script[src|type]",
		// Example content CSS (should be your site CSS)
		// TOFIX: add $ { theme.pathCss }
		content_css : "css/bootstrap.min.css",
});
</script>
</#macro>